package com.ngc.mall.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ngc.mall.bo.OrderMessageBO;
import com.ngc.mall.domain.CategoryDomain;
import com.ngc.mall.domain.CouponDomain;
import com.ngc.mall.dto.CouponDTO;
import com.ngc.mall.dto.CouponFilterDTO;
import com.ngc.mall.vo.CouponCategoryVO;
import com.ngc.mall.vo.PagingVO;
import com.ngc.mall.vo.UserCouponVO;

import java.time.LocalDateTime;
import java.util.List;

public interface ICouponService extends IService<CouponDomain> {

    Long createCoupon(CouponDTO dto);

    CouponDomain findById(Long cid);

    List<CouponDomain> findWholeStore(LocalDateTime now);

    List<UserCouponVO> findMyAvailable(Long userId, LocalDateTime now);

    List<UserCouponVO> findMyUsed(Long userId,LocalDateTime now);

    List<UserCouponVO> findMyExpired(Long userId,LocalDateTime now);

    Boolean collectOneCoupon(Long userId,Long couponId,Boolean limit);

    List<CouponCategoryVO> getUserCouponAvailableWithCategory(Long userId, LocalDateTime now);

    List<CouponDomain> findAllCoupon();


    Boolean deleteCouponTemplateById(Long id);

    List<CouponDomain> getByCategory(Long cid,LocalDateTime now);

    List<CouponDomain> findAllEnableCoupon();

    List<UserCouponVO> getMyAvaliableCouponWithCategory(Long uid,LocalDateTime now);

    List<CategoryDomain> findCategoriesById(Long cid);

    void returnBack(OrderMessageBO orderMessage);

    List<CouponDomain> findDaysCoupon();

    Boolean expire(Long cid,Long uid);

    PagingVO<CouponDomain> search(CouponFilterDTO dto,int start,int count);
}
